using Spine;
using Spine.Unity;
using UnityEngine;

public class StickLoadingController : MonoBehaviour
{
	private SkeletonAnimation skeletonAnimationHead;

	private void Start()
	{
		skeletonAnimationHead = GetComponent<SkeletonAnimation>();
		skeletonAnimationHead.state.Complete += AnimationComplete;
	}

	private void AnimationComplete(TrackEntry entry)
	{
		if (entry.animation.name == "animation2")
		{
			skeletonAnimationHead.state.SetAnimation(0, "animation", loop: true);
		}
	}
}
